<!doctype html>
<html>
{include file="head.html"}

<body>
  
 <div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="/index.php"><i class="back"></i></a></div>
      <div class="t_main">会员注册</div>
    </div>
    <div class="paddingheight"></div>
    <div class="loginbox">
      <div class="f_padding">
      <form id="reg-form">
        <ul class="form" >
          <li>
            <input class="inp" name="telephone" type="text" placeholder="请填写手机号码">
          </li>
          <li>
            <input class="inp" name="username" type="text" placeholder="请填写用户名（2-15位）">
          </li>
          <li>
            <input class="inp" name="password" type="password" placeholder="请填写密码（至少6位）">
          </li>
          <li>
            <input class="inp" name="password2" type="password" placeholder="重复密码">
          </li>
          <li><input class="inp code" name="checkcode" type="text" placeholder="验证码"> <img src="/index.php?m=checkcode" onClick="this.src='/index.php?m=checkcode&t='+Math.random()" height="40"></li>
          <li>
            <input type="button" id="reg-submit" class="btn" value="立即注册">
          </li>
          <li style="display:none">
            <div class="thirdlogin"> 第三方登录：<a href="" class="ico qq"></a><a href="" class="ico sina"></a><a href="" class="ico weixin"></a> </div>
          </li>
          <li><a href="/index.php?m=login" class="links">马上登录</a></li>
        </ul>
        </form>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript" class="jsa-text">
$(function(){
	var ispost=false;
	$(document).on("click","#reg-submit",function(){
		if(ispost==true) return false;
		ispost=true;
		setTimeout(function(){
			ispost=false;
		},1000);
		$.post("/index.php?m=register&a=regSave&ajax=1",$("#reg-form").serialize(),function(data){
			if(data.error){
				skyToast(data.message);
			}else{
				skyToast("注册成功");
				setTimeout(function(){
					window.location="/index.php";
				},700);
			}
		},"json");
	});
});
</script>
</body>
</html>
